<?php

include_once($_SERVER["DOCUMENT_ROOT"]."/admin/pub/header.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/public/function.php");
$config = include_once($_SERVER["DOCUMENT_ROOT"]."/public/config.php");

$res = selec($config,'fenlei');
?>
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="index.php">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="zuopin.php">作品管理</a><span class="crumb-step">&gt;</span><span>新增作品</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="doadd.php" method="post" id="myform" name="myform" enctype="multipart/form-data">

                    <table class="insert-tab" width="100%">
                        <tbody>
                        <tr>
                            <th width="120"><i class="require-red">*</i>分类：</th>
                            <td>
                                <select name="wid" id="catid" class="required">
                                    <option value="">请选择</option>
                                    <?php
                                        foreach ($res as $k => $v) {
                                            echo"<option value={$v['id']}>{$v['fenlei']}</option>";
                                        }
                                        //selected=  value={$v['id']}
                                    ?>
                                </select>
                            </td>
                        </tr>

                            <tr>
                                <th>作者：</th>
                                <td><input class="common-text" name="author" size="50" value="admin" type="text"></td>
                            </tr>

                            <tr>
                                <th><i class="require-red">*</i>标题：</th>
                                <td>
                                    <input class="common-text required" id="title" name="title" size="50" value="" type="text">
                                </td>
                            </tr>
                            
                            <tr>
                                <th><i class="require-red">*</i>图片：</th>
                                <td><input name="pic" id="" type="file" value=""><!--<input type="submit" onclick="submitForm('/jscss/admin/design/upload')" value="上传图片"/>--></td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>状态：</th>
                                <td>
                                    <input class="common-text required" id="" name="status" size="50" value="" type="text">
                                </td>
                            </tr>
                            <tr>
                                <th>内容：</th>
                                <td><textarea name="content" class="common-textarea" id="content" cols="30" style="width: 98%;" rows="10"></textarea></td>
                            </tr>

                            <input class="common-text" name="ctime" size="50" value="<?php echo time()?>" type="hidden">

                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                </form>
            </div>
        </div>

    </div>
    <!--/main-->
<?php

include_once($_SERVER["DOCUMENT_ROOT"]."/admin/pub/footer.php");
?>